
package com.ce.cases.source.logic.search;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.ce.cases.source.dao.po.CaseSourceFilesTemplate;
import com.ce.framework.datamaintain.action.SearchAction;
import com.ce.framework.datamaintain.logic.ISQLMapper;
import com.ce.framework.datamaintain.logic.SQLSearchCondition;
import com.ce.framework.exception.AppException;
import com.ce.framework.util.StringUtil;
import com.ce.sys.login.model.User;
import com.ce.sys.org.dao.po.SysVOrg;
import com.ce.util.OrgUtil;

/**
* 嫦娥软件有限公司 版权所有 2013
* 创建人：　andy
* 创建日期：2014-03-18
* 创建时间：15:29:27
* 功能描述：备选案源台账 [CASE_SOURCE]条件过滤类
* ==============================================
* 修改历史
* 修改人		修改时间		修改原因
*
* ==============================================
*/
public class CaseSourceFilesTemplateSearchCondition  extends SQLSearchCondition
	implements ISQLMapper
{

	   	private String vcFileName;
	   	private String vcSequence;

		public String getSearchSql() throws AppException {
			
			StringBuffer sql = new StringBuffer("select t.* from CASE_SOURCE_FILES_TEMPLATE t where  t.VC_DEL_FLAG = 0 ");
			
			
		
			/*=========自行修改该处代码================
			//实现排序的代码
			sql.append(" "+super.getOrderBy());
			======================================*/
			return sql.toString();
		}
		
		public Object fromSQLQuery(ResultSet rs, int num) {
			CaseSourceFilesTemplate view = new CaseSourceFilesTemplate();
			try {
				view.setVcId(rs.getString("VC_ID"));
				view.setVcFileId(rs.getString("vc_file_id"));
				view.setVcFileName(rs.getString("VC_FILE_NAME"));
				view.setVcType(rs.getString("VC_TYPE"));
				view.setVcBrowse(rs.getString("VC_BROWSE"));
				view.setVcSequence(rs.getString("VC_SEQUENCE"));
				view.setVcZgswj(rs.getString("vc_zgswj"));
			} catch (SQLException e) {
				
				e.printStackTrace();
			}
			return view;
		}
		
		public ISQLMapper getSQLMapper() {
			
			return this;
		}

		public String getVcFileName() {
			return vcFileName;
		}

		public void setVcFileName(String vcFileName) {
			this.vcFileName = vcFileName;
		}

		public String getVcSequence() {
			return vcSequence;
		}

		public void setVcSequence(String vcSequence) {
			this.vcSequence = vcSequence;
		}

		

}

